home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / j32.sit / j.rsrc / TEXT_1503_}.txt < prev    next >
Text File  |  1991-06-13  |  1KB  |  27 lines

  1. m}  (Adverb)
  2.  
  3. The verb m} is (m&[}) : (m&{})
  4. ________________________________
  5.  
  6. u}  (Adverb)
  7.  
  8. ITEM AMEND (_)  u}y is an amendment of the items of y whose shape is the shape of an item of y. Each atom is selected as a corresponding atom in an item, the item being specified by the index in the corresponding position of u i.# y (whose shape must be the shape of an item of y). Thus:
  9.  
  10.    m=.0 1 3 1 2
  11.    u=. m&{
  12.       y                   u i.}.$y
  13. abcde               0 1 3 1 2
  14. fghij
  15. klmno
  16. pqrst
  17.       u}y                 m}y
  18. agrio               agrio
  19.  
  20. AMEND (_ _)  If x has the same shape as the index array j=. u i.$y, then x u} y amends x┬áand y by  inserting the atoms of x in the selected positions of y. More generally, the shape of x may be a suffix of the shape of  j, and the result is an amendment of ($j) $ ,x and y. Thus, 'BD'1 3} 'abcd' is aBcD, and  if x=.'AGMS' and
  21. u=.(<0 1)&|: (the diagonal verb), then u i.$y is 0 6 12 18, and:
  22.  
  23.       y              x u} u      'Z' u} y
  24. abcde          Abcde             Zbcde
  25. fghij          fGhij             fZhij
  26. klmno          klMno             klZno
  27. pqrst          pqrSt             pqrZs